﻿<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Hotels.aspx.vb" Inherits="ELearning.Hotels" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
    <link href="StyleSheet1.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:LinkButton ID="LnkbtnAddHotel" runat="server" 
            PostBackUrl="~/AddHotels.aspx">AddHotel</asp:LinkButton>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            DataKeyNames="ID" DataSourceID="HotelDatasource" Class="img">
            <Columns>
                <asp:BoundField DataField="HotelName" HeaderText="HotelName" 
                    SortExpression="HotelName" />
                <asp:CheckBoxField DataField="PetsAllowed" HeaderText="PetsAllowed" 
                    SortExpression="PetsAllowed" />
                <asp:BoundField DataField="Stars" HeaderText="Stars" SortExpression="Stars" />
                <asp:ImageField DataImageUrlField="Picture" HeaderText="Thumbnail">
                </asp:ImageField>
                <asp:HyperLinkField DataNavigateUrlFields="ID" 
                    DataNavigateUrlFormatString="Details.aspx?ID={0}" Text="Details" />
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="HotelDatasource" runat="server" 
            ConnectionString="<%$ ConnectionStrings:HotelConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:HotelConnectionString.ProviderName %>" 
            SelectCommand="SELECT [HotelName], [Description], [PetsAllowed], [Picture], [Stars], [ID] FROM [hotel]">
        </asp:SqlDataSource>
    
    </div>
    </form>
</body>
</html>
